%% Time-stamp: <2006-02-19 15:08:05 Administrator> 
%% Copyright (C) 2005 by Joe Armstrong
%% All rights reserved.
%% The copyright holder hereby grants the rights of usage, distribution
%% and modification of this software to everyone and for any purpose, as
%% long as this license and the copyright notice above are preserved and
%% not modified. There is no warranty for this software.


-define(bg, "#ffffcc").

-record(win, {name="none", x=10, y=10, w=200, h=400, bg=?bg, title="Title", 
	      resize=false}).

-define(EVENT_KEY_PRESS,             16#00000001).
-define(EVENT_KEY_RELEASE,           16#00000002).
-define(EVENT_BUTTON_PRESS,          16#00000004).
-define(EVENT_BUTTON_RELEASE,        16#00000008).
-define(EVENT_ENTER_WINDOW,          16#00000010).
-define(EVENT_LEAVE_WINDOW,          16#00000020).
-define(EVENT_POINTER_MOTION,        16#00000040).
-define(EVENT_POINTER_MOTION_HINT,   16#00000080).
-define(EVENT_BUTTON1_MOTION,        16#00000100).
-define(EVENT_BUTTON2_MOTION,        16#00000200).
-define(EVENT_BUTTON3_MOTION,        16#00000400).
-define(EVENT_BUTTON4_MOTION,        16#00000800).
-define(EVENT_BUTTON5_MOTION,        16#00001000).
-define(EVENT_BUTTON_MOTION,         16#00002000).
-define(EVENT_KEYMAP_STATE,          16#00004000).
-define(EVENT_EXPOSURE,              16#00008000).
-define(EVENT_VISIBILITY_CHANGE,     16#00010000).
-define(EVENT_STRUCTURE_NOTIFY,      16#00020000).
-define(EVENT_RESIZE_REDIRECT,       16#00040000).
-define(EVENT_SUBSTRUCTURE_NOTIFY,   16#00080000).
-define(EVENT_SUBSTRUCTURE_REDIRECT, 16#00100000).
-define(EVENT_FOCUS_CHANGE,          16#00200000).
-define(EVENT_PROPERTY_CHANGE,       16#00400000).
-define(EVENT_COLORMAP_CHANGE,       16#00800000).
-define(EVENT_OWNER_GRAB_BUTTON,     16#01000000).


%% derived from /usr/X11R6/lib/X11/rgb.txt
-define(snow,"#FFFAFA").
-define(GhostWhite,"#F8F8FF").
-define(WhiteSmoke,"#F5F5F5").
-define(gainsboro,"#DCDCDC").
-define(FloralWhite,"#FFFAF0").
-define(OldLace,"#FDF5E6").
-define(linen,"#FAF0E6").
-define(AntiqueWhite,"#FAEBD7").
-define(PapayaWhip,"#FFEFD5").
-define(BlanchedAlmond,"#FFEBCD").
-define(bisque,"#FFE4C4").
-define(PeachPuff,"#FFDAB9").
-define(NavajoWhite,"#FFDEAD").
-define(moccasin,"#FFE4B5").
-define(cornsilk,"#FFF8DC").
-define(ivory,"#FFFFF0").
-define(LemonChiffon,"#FFFACD").
-define(seashell,"#FFF5EE").
-define(honeydew,"#F0FFF0").
-define(MintCream,"#F5FFFA").
-define(azure,"#F0FFFF").
-define(AliceBlue,"#F0F8FF").
-define(lavender,"#E6E6FA").
-define(LavenderBlush,"#FFF0F5").
-define(MistyRose,"#FFE4E1").
-define(white,"#FFFFFF").
-define(black,"#000000").
-define(DarkSlateGray,"#2F4F4F").
-define(DarkSlateGrey,"#2F4F4F").
-define(DimGray,"#696969").
-define(DimGrey,"#696969").
-define(SlateGray,"#708090").
-define(SlateGrey,"#708090").
-define(LightSlateGray,"#778899").
-define(LightSlateGrey,"#778899").
-define(gray,"#BEBEBE").
-define(grey,"#BEBEBE").
-define(LightGrey,"#D3D3D3").
-define(LightGray,"#D3D3D3").
-define(MidnightBlue,"#191970").
-define(navy,"#000080").
-define(NavyBlue,"#000080").
-define(CornflowerBlue,"#6495ED").
-define(DarkSlateBlue,"#483D8B").
-define(SlateBlue,"#6A5ACD").
-define(MediumSlateBlue,"#7B68EE").
-define(LightSlateBlue,"#8470FF").
-define(MediumBlue,"#0000CD").
-define(RoyalBlue,"#4169E1").
-define(blue,"#0000FF").
-define(DodgerBlue,"#1E90FF").
-define(DeepSkyBlue,"#BFFF").
-define(SkyBlue,"#87CEEB").
-define(LightSkyBlue,"#87CEFA").
-define(SteelBlue,"#4682B4").
-define(LightSteelBlue,"#B0C4DE").
-define(LightBlue,"#ADD8E6").
-define(PowderBlue,"#B0E0E6").
-define(PaleTurquoise,"#AFEEEE").
-define(DarkTurquoise,"#CED1").
-define(MediumTurquoise,"#48D1CC").
-define(turquoise,"#40E0D0").
-define(cyan,"#00FFFF").
-define(LightCyan,"#E0FFFF").
-define(CadetBlue,"#5F9EA0").
-define(MediumAquamarine,"#66CDAA").
-define(aquamarine,"#7FFFD4").
-define(DarkGreen,"#006400").
-define(DarkOliveGreen,"#556B2F").
-define(DarkSeaGreen,"#8FBC8F").
-define(SeaGreen,"#2E8B57").
-define(MediumSeaGreen,"#3CB371").
-define(LightSeaGreen,"#20B2AA").
-define(PaleGreen,"#98FB98").
-define(SpringGreen,"#00FF7F").
-define(LawnGreen,"#7CFC00").
-define(green,"#00FF00").
-define(chartreuse,"#7FFF00").
-define(MediumSpringGreen,"#00FA9A").
-define(GreenYellow,"#ADFF2F").
-define(LimeGreen,"#32CD32").
-define(YellowGreen,"#9ACD32").
-define(ForestGreen,"#228B22").
-define(OliveDrab,"#6B8E23").
-define(DarkKhaki,"#BDB76B").
-define(khaki,"#F0E68C").
-define(PaleGoldenrod,"#EEE8AA").
-define(LightGoldenrodYellow,"#FAFAD2").
-define(LightYellow,"#FFFFE0").
-define(yellow,"#FFFF00").
-define(gold,"#FFD700").
-define(LightGoldenrod,"#EEDD82").
-define(goldenrod,"#DAA520").
-define(DarkGoldenrod,"#B8860B").
-define(RosyBrown,"#BC8F8F").
-define(IndianRed,"#CD5C5C").
-define(SaddleBrown,"#8B4513").
-define(sienna,"#A0522D").
-define(peru,"#CD853F").
-define(burlywood,"#DEB887").
-define(beige,"#F5F5DC").
-define(wheat,"#F5DEB3").
-define(SandyBrown,"#F4A460").
-define(tan,"#D2B48C").
-define(chocolate,"#D2691E").
-define(firebrick,"#B22222").
-define(brown,"#A52A2A").
-define(DarkSalmon,"#E9967A").
-define(salmon,"#FA8072").
-define(LightSalmon,"#FFA07A").
-define(orange,"#FFA500").
-define(DarkOrange,"#FF8C00").
-define(coral,"#FF7F50").
-define(LightCoral,"#F08080").
-define(tomato,"#FF6347").
-define(OrangeRed,"#FF4500").
-define(red,"#FF0000").
-define(HotPink,"#FF69B4").
-define(DeepPink,"#FF1493").
-define(pink,"#FFC0CB").
-define(LightPink,"#FFB6C1").
-define(PaleVioletRed,"#DB7093").
-define(maroon,"#B03060").
-define(MediumVioletRed,"#C71585").
-define(VioletRed,"#D02090").
-define(magenta,"#FF00FF").
-define(violet,"#EE82EE").
-define(plum,"#DDA0DD").
-define(orchid,"#DA70D6").
-define(MediumOrchid,"#BA55D3").
-define(DarkOrchid,"#9932CC").
-define(DarkViolet,"#9400D3").
-define(BlueViolet,"#8A2BE2").
-define(purple,"#A020F0").
-define(MediumPurple,"#9370DB").
-define(thistle,"#D8BFD8").
-define(snow1,"#FFFAFA").
-define(snow2,"#EEE9E9").
-define(snow3,"#CDC9C9").
-define(snow4,"#8B8989").
-define(seashell1,"#FFF5EE").
-define(seashell2,"#EEE5DE").
-define(seashell3,"#CDC5BF").
-define(seashell4,"#8B8682").
-define(AntiqueWhite1,"#FFEFDB").
-define(AntiqueWhite2,"#EEDFCC").
-define(AntiqueWhite3,"#CDC0B0").
-define(AntiqueWhite4,"#8B8378").
-define(bisque1,"#FFE4C4").
-define(bisque2,"#EED5B7").
-define(bisque3,"#CDB79E").
-define(bisque4,"#8B7D6B").
-define(PeachPuff1,"#FFDAB9").
-define(PeachPuff2,"#EECBAD").
-define(PeachPuff3,"#CDAF95").
-define(PeachPuff4,"#8B7765").
-define(NavajoWhite1,"#FFDEAD").
-define(NavajoWhite2,"#EECFA1").
-define(NavajoWhite3,"#CDB38B").
-define(NavajoWhite4,"#8B795E").
-define(LemonChiffon1,"#FFFACD").
-define(LemonChiffon2,"#EEE9BF").
-define(LemonChiffon3,"#CDC9A5").
-define(LemonChiffon4,"#8B8970").
-define(cornsilk1,"#FFF8DC").
-define(cornsilk2,"#EEE8CD").
-define(cornsilk3,"#CDC8B1").
-define(cornsilk4,"#8B8878").
-define(ivory1,"#FFFFF0").
-define(ivory2,"#EEEEE0").
-define(ivory3,"#CDCDC1").
-define(ivory4,"#8B8B83").
-define(honeydew1,"#F0FFF0").
-define(honeydew2,"#E0EEE0").
-define(honeydew3,"#C1CDC1").
-define(honeydew4,"#838B83").
-define(LavenderBlush1,"#FFF0F5").
-define(LavenderBlush2,"#EEE0E5").
-define(LavenderBlush3,"#CDC1C5").
-define(LavenderBlush4,"#8B8386").
-define(MistyRose1,"#FFE4E1").
-define(MistyRose2,"#EED5D2").
-define(MistyRose3,"#CDB7B5").
-define(MistyRose4,"#8B7D7B").
-define(azure1,"#F0FFFF").
-define(azure2,"#E0EEEE").
-define(azure3,"#C1CDCD").
-define(azure4,"#838B8B").
-define(SlateBlue1,"#836FFF").
-define(SlateBlue2,"#7A67EE").
-define(SlateBlue3,"#6959CD").
-define(SlateBlue4,"#473C8B").
-define(RoyalBlue1,"#4876FF").
-define(RoyalBlue2,"#436EEE").
-define(RoyalBlue3,"#3A5FCD").
-define(RoyalBlue4,"#27408B").
-define(blue1,"#0000FF").
-define(blue2,"#0000EE").
-define(blue3,"#0000CD").
-define(blue4,"#00008B").
-define(DodgerBlue1,"#1E90FF").
-define(DodgerBlue2,"#1C86EE").
-define(DodgerBlue3,"#1874CD").
-define(DodgerBlue4,"#104E8B").
-define(SteelBlue1,"#63B8FF").
-define(SteelBlue2,"#5CACEE").
-define(SteelBlue3,"#4F94CD").
-define(SteelBlue4,"#36648B").
-define(DeepSkyBlue1,"#00BFFF").
-define(DeepSkyBlue2,"#00B2EE").
-define(DeepSkyBlue3,"#009ACD").
-define(DeepSkyBlue4,"#00688B").
-define(SkyBlue1,"#87CEFF").
-define(SkyBlue2,"#7EC0EE").
-define(SkyBlue3,"#6CA6CD").
-define(SkyBlue4,"#4A708B").
-define(LightSkyBlue1,"#B0E2FF").
-define(LightSkyBlue2,"#A4D3EE").
-define(LightSkyBlue3,"#8DB6CD").
-define(LightSkyBlue4,"#607B8B").
-define(SlateGray1,"#C6E2FF").
-define(SlateGray2,"#B9D3EE").
-define(SlateGray3,"#9FB6CD").
-define(SlateGray4,"#6C7B8B").
-define(LightSteelBlue1,"#CAE1FF").
-define(LightSteelBlue2,"#BCD2EE").
-define(LightSteelBlue3,"#A2B5CD").
-define(LightSteelBlue4,"#6E7B8B").
-define(LightBlue1,"#BFEFFF").
-define(LightBlue2,"#B2DFEE").
-define(LightBlue3,"#9AC0CD").
-define(LightBlue4,"#68838B").
-define(LightCyan1,"#E0FFFF").
-define(LightCyan2,"#D1EEEE").
-define(LightCyan3,"#B4CDCD").
-define(LightCyan4,"#7A8B8B").
-define(PaleTurquoise1,"#BBFFFF").
-define(PaleTurquoise2,"#AEEEEE").
-define(PaleTurquoise3,"#96CDCD").
-define(PaleTurquoise4,"#668B8B").
-define(CadetBlue1,"#98F5FF").
-define(CadetBlue2,"#8EE5EE").
-define(CadetBlue3,"#7AC5CD").
-define(CadetBlue4,"#53868B").
-define(turquoise1,"#F5FF").
-define(turquoise2,"#E5EE").
-define(turquoise3,"#C5CD").
-define(turquoise4,"#868B").
-define(cyan1,"#FFFF").
-define(cyan2,"#EEEE").
-define(cyan3,"#CDCD").
-define(cyan4,"#8B8B").
-define(DarkSlateGray1,"#97FFFF").
-define(DarkSlateGray2,"#8DEEEE").
-define(DarkSlateGray3,"#79CDCD").
-define(DarkSlateGray4,"#528B8B").
-define(aquamarine1,"#7FFFD4").
-define(aquamarine2,"#76EEC6").
-define(aquamarine3,"#66CDAA").
-define(aquamarine4,"#458B74").
-define(DarkSeaGreen1,"#C1FFC1").
-define(DarkSeaGreen2,"#B4EEB4").
-define(DarkSeaGreen3,"#9BCD9B").
-define(DarkSeaGreen4,"#698B69").
-define(SeaGreen1,"#54FF9F").
-define(SeaGreen2,"#4EEE94").
-define(SeaGreen3,"#43CD80").
-define(SeaGreen4,"#2E8B57").
-define(PaleGreen1,"#9AFF9A").
-define(PaleGreen2,"#90EE90").
-define(PaleGreen3,"#7CCD7C").
-define(PaleGreen4,"#548B54").
-define(SpringGreen1,"#FF7F").
-define(SpringGreen2,"#EE76").
-define(SpringGreen3,"#CD66").
-define(SpringGreen4,"#8B45").
-define(green1,"#FF00").
-define(green2,"#EE00").
-define(green3,"#CD00").
-define(green4,"#8B00").
-define(chartreuse1,"#7FFF00").
-define(chartreuse2,"#76EE00").
-define(chartreuse3,"#66CD00").
-define(chartreuse4,"#458B00").
-define(OliveDrab1,"#C0FF3E").
-define(OliveDrab2,"#B3EE3A").
-define(OliveDrab3,"#9ACD32").
-define(OliveDrab4,"#698B22").
-define(DarkOliveGreen1,"#CAFF70").
-define(DarkOliveGreen2,"#BCEE68").
-define(DarkOliveGreen3,"#A2CD5A").
-define(DarkOliveGreen4,"#6E8B3D").
-define(khaki1,"#FFF68F").
-define(khaki2,"#EEE685").
-define(khaki3,"#CDC673").
-define(khaki4,"#8B864E").
-define(LightGoldenrod1,"#FFEC8B").
-define(LightGoldenrod2,"#EEDC82").
-define(LightGoldenrod3,"#CDBE70").
-define(LightGoldenrod4,"#8B814C").
-define(LightYellow1,"#FFFFE0").
-define(LightYellow2,"#EEEED1").
-define(LightYellow3,"#CDCDB4").
-define(LightYellow4,"#8B8B7A").
-define(yellow1,"#FFFF00").
-define(yellow2,"#EEEE00").
-define(yellow3,"#CDCD00").
-define(yellow4,"#8B8B00").
-define(gold1,"#FFD700").
-define(gold2,"#EEC900").
-define(gold3,"#CDAD00").
-define(gold4,"#8B7500").
-define(goldenrod1,"#FFC125").
-define(goldenrod2,"#EEB422").
-define(goldenrod3,"#CD9B1D").
-define(goldenrod4,"#8B6914").
-define(DarkGoldenrod1,"#FFB90F").
-define(DarkGoldenrod2,"#EEAD0E").
-define(DarkGoldenrod3,"#CD950C").
-define(DarkGoldenrod4,"#8B6508").
-define(RosyBrown1,"#FFC1C1").
-define(RosyBrown2,"#EEB4B4").
-define(RosyBrown3,"#CD9B9B").
-define(RosyBrown4,"#8B6969").
-define(IndianRed1,"#FF6A6A").
-define(IndianRed2,"#EE6363").
-define(IndianRed3,"#CD5555").
-define(IndianRed4,"#8B3A3A").
-define(sienna1,"#FF8247").
-define(sienna2,"#EE7942").
-define(sienna3,"#CD6839").
-define(sienna4,"#8B4726").
-define(burlywood1,"#FFD39B").
-define(burlywood2,"#EEC591").
-define(burlywood3,"#CDAA7D").
-define(burlywood4,"#8B7355").
-define(wheat1,"#FFE7BA").
-define(wheat2,"#EED8AE").
-define(wheat3,"#CDBA96").
-define(wheat4,"#8B7E66").
-define(tan1,"#FFA54F").
-define(tan2,"#EE9A49").
-define(tan3,"#CD853F").
-define(tan4,"#8B5A2B").
-define(chocolate1,"#FF7F24").
-define(chocolate2,"#EE7621").
-define(chocolate3,"#CD661D").
-define(chocolate4,"#8B4513").
-define(firebrick1,"#FF3030").
-define(firebrick2,"#EE2C2C").
-define(firebrick3,"#CD2626").
-define(firebrick4,"#8B1A1A").
-define(brown1,"#FF4040").
-define(brown2,"#EE3B3B").
-define(brown3,"#CD3333").
-define(brown4,"#8B2323").
-define(salmon1,"#FF8C69").
-define(salmon2,"#EE8262").
-define(salmon3,"#CD7054").
-define(salmon4,"#8B4C39").
-define(LightSalmon1,"#FFA07A").
-define(LightSalmon2,"#EE9572").
-define(LightSalmon3,"#CD8162").
-define(LightSalmon4,"#8B5742").
-define(orange1,"#FFA500").
-define(orange2,"#EE9A00").
-define(orange3,"#CD8500").
-define(orange4,"#8B5A00").
-define(DarkOrange1,"#FF7F00").
-define(DarkOrange2,"#EE7600").
-define(DarkOrange3,"#CD6600").
-define(DarkOrange4,"#8B4500").
-define(coral1,"#FF7256").
-define(coral2,"#EE6A50").
-define(coral3,"#CD5B45").
-define(coral4,"#8B3E2F").
-define(tomato1,"#FF6347").
-define(tomato2,"#EE5C42").
-define(tomato3,"#CD4F39").
-define(tomato4,"#8B3626").
-define(OrangeRed1,"#FF4500").
-define(OrangeRed2,"#EE4000").
-define(OrangeRed3,"#CD3700").
-define(OrangeRed4,"#8B2500").
-define(red1,"#FF0000").
-define(red2,"#EE0000").
-define(red3,"#CD0000").
-define(red4,"#8B0000").
-define(DeepPink1,"#FF1493").
-define(DeepPink2,"#EE1289").
-define(DeepPink3,"#CD1076").
-define(DeepPink4,"#8B0A50").
-define(HotPink1,"#FF6EB4").
-define(HotPink2,"#EE6AA7").
-define(HotPink3,"#CD6090").
-define(HotPink4,"#8B3A62").
-define(pink1,"#FFB5C5").
-define(pink2,"#EEA9B8").
-define(pink3,"#CD919E").
-define(pink4,"#8B636C").
-define(LightPink1,"#FFAEB9").
-define(LightPink2,"#EEA2AD").
-define(LightPink3,"#CD8C95").
-define(LightPink4,"#8B5F65").
-define(PaleVioletRed1,"#FF82AB").
-define(PaleVioletRed2,"#EE799F").
-define(PaleVioletRed3,"#CD6889").
-define(PaleVioletRed4,"#8B475D").
-define(maroon1,"#FF34B3").
-define(maroon2,"#EE30A7").
-define(maroon3,"#CD2990").
-define(maroon4,"#8B1C62").
-define(VioletRed1,"#FF3E96").
-define(VioletRed2,"#EE3A8C").
-define(VioletRed3,"#CD3278").
-define(VioletRed4,"#8B2252").
-define(magenta1,"#FF00FF").
-define(magenta2,"#EE00EE").
-define(magenta3,"#CD00CD").
-define(magenta4,"#8B008B").
-define(orchid1,"#FF83FA").
-define(orchid2,"#EE7AE9").
-define(orchid3,"#CD69C9").
-define(orchid4,"#8B4789").
-define(plum1,"#FFBBFF").
-define(plum2,"#EEAEEE").
-define(plum3,"#CD96CD").
-define(plum4,"#8B668B").
-define(MediumOrchid1,"#E066FF").
-define(MediumOrchid2,"#D15FEE").
-define(MediumOrchid3,"#B452CD").
-define(MediumOrchid4,"#7A378B").
-define(DarkOrchid1,"#BF3EFF").
-define(DarkOrchid2,"#B23AEE").
-define(DarkOrchid3,"#9A32CD").
-define(DarkOrchid4,"#68228B").
-define(purple1,"#9B30FF").
-define(purple2,"#912CEE").
-define(purple3,"#7D26CD").
-define(purple4,"#551A8B").
-define(MediumPurple1,"#AB82FF").
-define(MediumPurple2,"#9F79EE").
-define(MediumPurple3,"#8968CD").
-define(MediumPurple4,"#5D478B").
-define(thistle1,"#FFE1FF").
-define(thistle2,"#EED2EE").
-define(thistle3,"#CDB5CD").
-define(thistle4,"#8B7B8B").
-define(gray0,"#0").
-define(grey0,"#0").
-define(gray1,"#30303").
-define(grey1,"#30303").
-define(gray2,"#50505").
-define(grey2,"#50505").
-define(gray3,"#80808").
-define(grey3,"#80808").
-define(gray4,"#A0A0A").
-define(grey4,"#A0A0A").
-define(gray5,"#D0D0D").
-define(grey5,"#D0D0D").
-define(gray6,"#F0F0F").
-define(grey6,"#F0F0F").
-define(gray7,"#121212").
-define(grey7,"#121212").
-define(gray8,"#141414").
-define(grey8,"#141414").
-define(gray9,"#171717").
-define(grey9,"#171717").
-define(gray10,"#1A1A1A").
-define(grey10,"#1A1A1A").
-define(gray11,"#1C1C1C").
-define(grey11,"#1C1C1C").
-define(gray12,"#1F1F1F").
-define(grey12,"#1F1F1F").
-define(gray13,"#212121").
-define(grey13,"#212121").
-define(gray14,"#242424").
-define(grey14,"#242424").
-define(gray15,"#262626").
-define(grey15,"#262626").
-define(gray16,"#292929").
-define(grey16,"#292929").
-define(gray17,"#2B2B2B").
-define(grey17,"#2B2B2B").
-define(gray18,"#2E2E2E").
-define(grey18,"#2E2E2E").
-define(gray19,"#303030").
-define(grey19,"#303030").
-define(gray20,"#333333").
-define(grey20,"#333333").
-define(gray21,"#363636").
-define(grey21,"#363636").
-define(gray22,"#383838").
-define(grey22,"#383838").
-define(gray23,"#3B3B3B").
-define(grey23,"#3B3B3B").
-define(gray24,"#3D3D3D").
-define(grey24,"#3D3D3D").
-define(gray25,"#404040").
-define(grey25,"#404040").
-define(gray26,"#424242").
-define(grey26,"#424242").
-define(gray27,"#454545").
-define(grey27,"#454545").
-define(gray28,"#474747").
-define(grey28,"#474747").
-define(gray29,"#4A4A4A").
-define(grey29,"#4A4A4A").
-define(gray30,"#4D4D4D").
-define(grey30,"#4D4D4D").
-define(gray31,"#4F4F4F").
-define(grey31,"#4F4F4F").
-define(gray32,"#525252").
-define(grey32,"#525252").
-define(gray33,"#545454").
-define(grey33,"#545454").
-define(gray34,"#575757").
-define(grey34,"#575757").
-define(gray35,"#595959").
-define(grey35,"#595959").
-define(gray36,"#5C5C5C").
-define(grey36,"#5C5C5C").
-define(gray37,"#5E5E5E").
-define(grey37,"#5E5E5E").
-define(gray38,"#616161").
-define(grey38,"#616161").
-define(gray39,"#636363").
-define(grey39,"#636363").
-define(gray40,"#666666").
-define(grey40,"#666666").
-define(gray41,"#696969").
-define(grey41,"#696969").
-define(gray42,"#6B6B6B").
-define(grey42,"#6B6B6B").
-define(gray43,"#6E6E6E").
-define(grey43,"#6E6E6E").
-define(gray44,"#707070").
-define(grey44,"#707070").
-define(gray45,"#737373").
-define(grey45,"#737373").
-define(gray46,"#757575").
-define(grey46,"#757575").
-define(gray47,"#787878").
-define(grey47,"#787878").
-define(gray48,"#7A7A7A").
-define(grey48,"#7A7A7A").
-define(gray49,"#7D7D7D").
-define(grey49,"#7D7D7D").
-define(gray50,"#7F7F7F").
-define(grey50,"#7F7F7F").
-define(gray51,"#828282").
-define(grey51,"#828282").
-define(gray52,"#858585").
-define(grey52,"#858585").
-define(gray53,"#878787").
-define(grey53,"#878787").
-define(gray54,"#8A8A8A").
-define(grey54,"#8A8A8A").
-define(gray55,"#8C8C8C").
-define(grey55,"#8C8C8C").
-define(gray56,"#8F8F8F").
-define(grey56,"#8F8F8F").
-define(gray57,"#919191").
-define(grey57,"#919191").
-define(gray58,"#949494").
-define(grey58,"#949494").
-define(gray59,"#969696").
-define(grey59,"#969696").
-define(gray60,"#999999").
-define(grey60,"#999999").
-define(gray61,"#9C9C9C").
-define(grey61,"#9C9C9C").
-define(gray62,"#9E9E9E").
-define(grey62,"#9E9E9E").
-define(gray63,"#A1A1A1").
-define(grey63,"#A1A1A1").
-define(gray64,"#A3A3A3").
-define(grey64,"#A3A3A3").
-define(gray65,"#A6A6A6").
-define(grey65,"#A6A6A6").
-define(gray66,"#A8A8A8").
-define(grey66,"#A8A8A8").
-define(gray67,"#ABABAB").
-define(grey67,"#ABABAB").
-define(gray68,"#ADADAD").
-define(grey68,"#ADADAD").
-define(gray69,"#B0B0B0").
-define(grey69,"#B0B0B0").
-define(gray70,"#B3B3B3").
-define(grey70,"#B3B3B3").
-define(gray71,"#B5B5B5").
-define(grey71,"#B5B5B5").
-define(gray72,"#B8B8B8").
-define(grey72,"#B8B8B8").
-define(gray73,"#BABABA").
-define(grey73,"#BABABA").
-define(gray74,"#BDBDBD").
-define(grey74,"#BDBDBD").
-define(gray75,"#BFBFBF").
-define(grey75,"#BFBFBF").
-define(gray76,"#C2C2C2").
-define(grey76,"#C2C2C2").
-define(gray77,"#C4C4C4").
-define(grey77,"#C4C4C4").
-define(gray78,"#C7C7C7").
-define(grey78,"#C7C7C7").
-define(gray79,"#C9C9C9").
-define(grey79,"#C9C9C9").
-define(gray80,"#CCCCCC").
-define(grey80,"#CCCCCC").
-define(gray81,"#CFCFCF").
-define(grey81,"#CFCFCF").
-define(gray82,"#D1D1D1").
-define(grey82,"#D1D1D1").
-define(gray83,"#D4D4D4").
-define(grey83,"#D4D4D4").
-define(gray84,"#D6D6D6").
-define(grey84,"#D6D6D6").
-define(gray85,"#D9D9D9").
-define(grey85,"#D9D9D9").
-define(gray86,"#DBDBDB").
-define(grey86,"#DBDBDB").
-define(gray87,"#DEDEDE").
-define(grey87,"#DEDEDE").
-define(gray88,"#E0E0E0").
-define(grey88,"#E0E0E0").
-define(gray89,"#E3E3E3").
-define(grey89,"#E3E3E3").
-define(gray90,"#E5E5E5").
-define(grey90,"#E5E5E5").
-define(gray91,"#E8E8E8").
-define(grey91,"#E8E8E8").
-define(gray92,"#EBEBEB").
-define(grey92,"#EBEBEB").
-define(gray93,"#EDEDED").
-define(grey93,"#EDEDED").
-define(gray94,"#F0F0F0").
-define(grey94,"#F0F0F0").
-define(gray95,"#F2F2F2").
-define(grey95,"#F2F2F2").
-define(gray96,"#F5F5F5").
-define(grey96,"#F5F5F5").
-define(gray97,"#F7F7F7").
-define(grey97,"#F7F7F7").
-define(gray98,"#FAFAFA").
-define(grey98,"#FAFAFA").
-define(gray99,"#FCFCFC").
-define(grey99,"#FCFCFC").
-define(gray100,"#FFFFFF").
-define(grey100,"#FFFFFF").
-define(DarkGrey,"#A9A9A9").
-define(DarkGray,"#A9A9A9").
-define(DarkBlue,"#8B").
-define(DarkCyan,"#8B8B").
-define(DarkMagenta,"#8B008B").
-define(DarkRed,"#8B0000").
-define(LightGreen,"#90EE90").


%% $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ */
%%  
%%  opyright 1987, 1998  The Open Group
%% 
%% Permission to use, copy, modify, distribute, and sell this software and its
%% documentation for any purpose is hereby granted without fee, provided that
%% the above copyright notice appear in all copies and that both that
%% copyright notice and this permission notice appear in supporting
%% documentation.
%% 
%% The above copyright notice and this permission notice shall be included
%% in all copies or substantial portions of the Software.
%% 
%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
%% OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
%% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
%% IN NOEVEN T SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
%% OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
%% ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
%% OTHER DEALINGS IN THE SOFTWARE.
%% 
%% Except as contained in this notice, the name of The Open Group shall
%% not be used in advertising or otherwise to promote the sale, use or
%% other dealings in this Software without prior written authorization
%% from The Open Group.


-define(XC_num_glyphs,154).
-define(XC_X_cursor,0).
-define(XC_arrow,2).
-define(XC_based_arrow_down,4).
-define(XC_based_arrow_up,6).
-define(XC_boat,8).
-define(XC_bogosity,10).
-define(XC_bottom_left_corner,12).
-define(XC_bottom_right_corner,14).
-define(XC_bottom_side,16).
-define(XC_bottom_tee,18).
-define(XC_box_spiral,20).
-define(XC_center_ptr,22).
-define(XC_circle,24).
-define(XC_clock,26).
-define(XC_coffee_mug,28).
-define(XC_cross,30).
-define(XC_cross_reverse,32).
-define(XC_crosshair,34).
-define(XC_diamond_cross,36).
-define(XC_dot,38).
-define(XC_dotbox,40).
-define(XC_double_arrow,42).
-define(XC_draft_large,44).
-define(XC_draft_small,46).
-define(XC_draped_box,48).
-define(XC_exchange,50).
-define(XC_fleur,52).
-define(XC_gobbler,54).
-define(XC_gumby,56).
-define(XC_hand1,58).
-define(XC_hand2,60).
-define(XC_heart,62).
-define(XC_icon,64).
-define(XC_iron_cross,66).
-define(XC_left_ptr,68).
-define(XC_left_side,70).
-define(XC_left_tee,72).
-define(XC_leftbutton,74).
-define(XC_ll_angle,76).
-define(XC_lr_angle,78).
-define(XC_man,80).
-define(XC_middlebutton,82).
-define(XC_mouse,84).
-define(XC_pencil,86).
-define(XC_pirate,88).
-define(XC_plus,90).
-define(XC_question_arrow,92).
-define(XC_right_ptr,94).
-define(XC_right_side,96).
-define(XC_right_tee,98).
-define(XC_rightbutton,100).
-define(XC_rtl_logo,102).
-define(XC_sailboat,104).
-define(XC_sb_down_arrow,106).
-define(XC_sb_h_double_arrow,108).
-define(XC_sb_left_arrow,110).
-define(XC_sb_right_arrow,112).
-define(XC_sb_up_arrow,114).
-define(XC_sb_v_double_arrow,116).
-define(XC_shuttle,118).
-define(XC_sizing,120).
-define(XC_spider,122).
-define(XC_spraycan,124).
-define(XC_star,126).
-define(XC_target,128).
-define(XC_tcross,130).
-define(XC_top_left_arrow,132).
-define(XC_top_left_corner,134).
-define(XC_top_right_corner,136).
-define(XC_top_side,138).
-define(XC_top_tee,140).
-define(XC_trek,142).
-define(XC_ul_angle,144).
-define(XC_umbrella,146).
-define(XC_ur_angle,148).
-define(XC_watch,150).
-define(XC_xterm,152).

-record(window,   {w,h,color=?bg,title="no Title", bindings=[]}).
-record(button,   {x,y,w,h=25,bg=?white,fg=?black,txt,click=false}).
-record(entry,    {x,y,w=20,txt,click=false}).
-record(dragBlob, {x,y,w=10,h=10,radius=10,
		   shape=square,color="black",moved=false}).
-record(label,    {x,y,txt}).
-record(line,     {x0,y0,x1,y1,width,arrow="none"}).
-record(circle,   {x,y,radius=10,color="green",tags=[]}).
-record(hyper,    {x,y,txt,click=false}).
-record(editor,   {x,y,w,h,txt="Edit"}).

-record(obj,
	{x = 10,
	 y = 10,
	 w = 120,
	 h = 30,
	 type = none,
	 parent = none,
	 obj = none,
	 frame = none,
	 bg = none, 
	 fg = none,
	 text = none,
	 border = 0,     % border in lables
	 relief = flat,  % raised, sunken, flat, ridge, solid, and groove
	 click = false, 
	 enter = false,  % enter fun
	 leave = false,  % enter and leave fun
	 moved = false,  % moved fun used in top
	 enabled = false
	 }).

